package com.growthgate.bootcommon.common.base;

import com.growthgate.bootcommon.util.IpUtils;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * BaseController
 *
 * @author GrowthGate
 * @date 2020/2/17
 */
@Component
public class BaseController {

    @Resource
    protected HttpServletRequest request;

    @Resource
    protected HttpServletResponse response;

    protected String getIp() {
        return IpUtils.getIp(request);
    }

}